package com.esun.rabbit2.communicaters.recharg;

import com.esun.util.log.EDebug;

/**
 * @ClassName: Bussiness10200
 * @Description: TODO(业务编号10200 用户相关 用户统一登陆接口)
 * @author Miko baoz@500wan.com
 * @date 2011-1-13 下午09:50:27
 * 
 */
public class Bussiness10200 extends PostAndAnalysisEr {

	public Bussiness10200(String userSession, String strBody, short wMFuncNo, byte compress, byte encrypt) {
		super(userSession, strBody, wMFuncNo, compress, encrypt);
		
		EDebug.o(this,"comming to this line??");
		
		// TODO Auto-generated constructor stub

		this.strReturn = super.getResult();

	}

	private String[] strReturn;

	/**
	 * <p>
	 * 登陆状态
	 * </p>
	 * 
	 * @return true 登陆成功
	 * @return false 登陆失败
	 * 
	 * @author Miko
	 */
	public boolean isLogin() {

		if (strReturn.length < 4) {
			EDebug.o(this, strReturn);
			return false;
		} else {
			EDebug.o(this, strReturn);
			RechargeUserInfo.getUserInfo().setBalance(strReturn[1]);
			RechargeUserInfo.getUserInfo().setFreeze(strReturn[2]);
			RechargeUserInfo.getUserInfo().setSessionId(strReturn[3]);
			// BussinessTest.userInfo.setSessionId(strReturn[3]);
			return true;
		}

	}

}
